package com.wechat.order.platform.redisConverAndSend;



import com.wechat.order.platform.webScoket.WebSocket;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.listener.ChannelTopic;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.security.crypto.codec.Utf8;
import org.springframework.stereotype.Component;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * Created by zzy on 2017/12/25.
 */
@Component
@Slf4j
public class RedisHandler {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;
    /**
     * 发送消息
     */
    public void sendMessage2Redis(){
      stringRedisTemplate.convertAndSend("hello","zzy");
    }
}
